package peer.rdp.message;

import java.net.DatagramPacket;

import peer.Message;
import peer.tools.ByteShortSwitch;

public class LiveMessage extends Message{
	public short sType=peer.tools.MessageType.sType_RDP_LiveMessage;
	byte[] dpData=new byte[4];
	public LiveMessage(){
		ByteShortSwitch.toByteArray(ver, dpData, 0);  //add: ver
		ByteShortSwitch.toByteArray(sType, dpData, 2);  //add: service type
		
		dp=new DatagramPacket(dpData,dpData.length);
	}
	
	LiveMessage(DatagramPacket dp){
		this.dp=dp;
		dpData=dp.getData();
		ver=ByteShortSwitch.toShort(dpData, 0);
		sType=ByteShortSwitch.toShort(dpData, 2);
	}

}
